package com.hxl.linuxfilemanager.service.impl;

import com.hxl.linuxfilemanager.config.LinuxPropertiesConfig;
import com.hxl.linuxfilemanager.service.IUserService;
import com.hxl.linuxfilemanager.util.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements IUserService {
    @Autowired
    LinuxPropertiesConfig linuxPropertiesConfig;

    @Override
    public boolean checkUser(String id) {
        String  userMerge=linuxPropertiesConfig.getUserName()+"@"+ linuxPropertiesConfig.getUserPass();
        return StringUtils.md5Str(userMerge).equals(id);
    }
}
